﻿namespace WMS6.Web.Inbound
{
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class ReceiptRevertQuery : BasePage
    {
        protected Button btnExport;
        protected Button btnList;
        protected Button btnNew;
        protected Button btnSearch;
        protected DropDownList ddlAdJustMentDate;
        protected DropDownList ddlAdJustMentID;
        protected DropDownList ddlIsActive;
        protected DropDownList ddlIsActiveOper;
        protected DropDownList ddlOwnerID;
        protected DropDownList ddlReceiptID;
        protected HtmlForm F4030;
        protected HtmlInputHidden hdnActionID;
        protected HtmlInputHidden hdncalendarFlag;
        protected HtmlInputHidden hdnDataFormat;
        protected HtmlHead Head1;
        protected HtmlImage img2;
        protected Label lblAdJustMentDate;
        protected Label lblAdJustMentID;
        protected Label lblIsActive;
        protected Label lblOwnerID;
        protected Label lblReceiptID;
        protected Label lblReceiptQuery;
        protected HtmlLink mycss;
        protected TextBox txtAdJustMentDate;
        protected TextBox txtAdJustMentDate2;
        protected TextBox txtAdJustMentID;
        protected TextBox txtOwnerID;
        protected TextBox txtReceiptID;

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer("ReceiptRevertList.aspx", false);
        }

        private void LoadDDl()
        {
            base.InitQueryDDL(this.ddlReceiptID, 0);
            base.InitQueryDDL(this.ddlAdJustMentID, 0);
            base.InitQueryDDL(this.ddlOwnerID, 0);
            base.InitQueryDDL(this.ddlAdJustMentDate, 1);
            base.InitIsActiveDDL(this.ddlIsActive, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            base.InitPage(this.Page);
            this.LoadDDl();
        }

        public string AdJustMentDate
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtAdJustMentDate.Text.Trim()))
                {
                    return base.GetParamsString(this.txtAdJustMentDate.Text.Trim(), this.ddlAdJustMentDate.SelectedValue, this.txtAdJustMentDate2.Text.Trim(), "AdJustMentDate");
                }
                return "";
            }
        }

        public string AdJustMentID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtAdJustMentID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtAdJustMentID.Text.Trim(), this.ddlAdJustMentID.SelectedValue);
                }
                return "";
            }
        }

        public string IsActive
        {
            get
            {
                if (!string.IsNullOrEmpty(this.ddlIsActive.SelectedValue))
                {
                    return base.GetParamsString(this.ddlIsActive.SelectedValue, this.ddlIsActiveOper.SelectedValue);
                }
                return "";
            }
        }

        public string OwnerID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtOwnerID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtOwnerID.Text.Trim(), this.ddlOwnerID.SelectedValue);
                }
                return "";
            }
        }

        public string ReceiptID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtReceiptID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtReceiptID.Text.Trim(), this.ddlReceiptID.SelectedValue);
                }
                return "";
            }
        }
    }
}

